import axiosIntance from "../axiosInstance";

const movieInfo= {
    getAllList() {
        return axiosIntance.get("/movie-info/getAllList");
    },
    getListByPage({pageIndex,tags,movie_name}) {
        return axiosIntance.get("/movie-info/getListByPage",{
            params:{
                pageIndex,tags,movie_name
            }
        });
    },
    deleteById(id) {
        return axiosIntance.delete(`/movie-info/deleteById/`+id);
    },
    add({ movie_name, duration, movie_pc, movie_desc, publicTime, tags, role, movie_score }) {
        return axiosInstance.post(`/movie-info/add`, {
            movie_name, duration, movie_pc, movie_desc, publicTime, tags, role, movie_score
        })
    },
    findById(id) {
        return axiosInstance.get(`/movie-info/findById/`+id);
    },
    //更新影片信息
    update({id,movie_name,duration,movie_pc,movie_desc,publicTime,tags}) {
        return axiosIntance.patch("/movie-info/update/"+id,{
            movie_name,duration,movie_pc,movie_desc,publicTime,tags
        });
    }
}
export default movieInfo;